<template>
  <div class="chat">
    <div class="chat-container flex-row">
      <div class="chat-type-wrap flex-col-4">
        <div class="chat-type card">
          <div class="type active" @click="changePanel('Reply')">商品评价</div>
          <!-- <div class="type" @click="changePanel('Love')">收获的赞</div> -->
          <div class="type" @click="changePanel('MyInfo')">我的消息</div>
        </div>
      </div>
      <div class="chat-panel-wrap flex-col-20">
        <div class="chat-panel card">
          <component :is="comName"></component>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Reply from './components/Reply'
import Love from './components/Love'
import MyInfo from './components/MyInfo'
export default {
  data() {
    return {
      comName: 'Reply',
      activeName: 'second'
    }
  },
  components: {
    Reply,
    Love,
    MyInfo,
  },
  methods: {
    changePanel(panel) {
      this.comName = panel
    },
    handleClick(tab, event) {
      console.log(tab, event)
    },
  },
}
</script>

<style lang="less" scoped>
.chat-container {
  flex-wrap: wrap;
}
.chat-type-wrap {
  padding: 10px;
  box-sizing: border-box;
}
.chat-type {
  padding: 15px;
  box-sizing: border-box;
}
.type {
  display: block;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 5px;
  font-size: 14px;
  color: var(--text-normal-color);
  transition: var(--tran-01);
  cursor: pointer;
  &.active {
    color: var(--text-sidebar-hover-color);
    background-color: var(--primary-color);
  }
  &:hover {
    color: var(--text-sidebar-hover-color);
    background-color: var(--primary-color);
  }
}
.chat-panel-wrap {
  padding: 10px;
  box-sizing: border-box;
  .chat-panel {
    padding: 15px;
  }
}
</style>
